<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>单表管理</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document).ready(function() {

	});
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a
			href="${ctx}/cloudfactory/cloudfactoryFunction/">功能表单</a></li>
		<shiro:hasPermission name="cloudfactory:cloudfactoryFunction:edit">
			<li><a href="${ctx}/cloudfactory/cloudfactoryFunction/form">功能添加</a></li>
		</shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="cloudfactoryFunction"
		action="${ctx}/cloudfactory/cloudfactoryFunction/" method="post"
		class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
		<input id="pageSize" name="pageSize" type="hidden"
			value="${page.pageSize}" />
		<ul class="ul-form">


			<li><label>菜单类型:</label> <form:select path="functionType"
					class="input-medium">
					<form:option value="" label="" />
					<form:options items="${fns:getDictList('function_type')}"
						itemLabel="label" itemValue="value" htmlEscape="false" />
				</form:select></li>
			<li><label>功能菜单：</label> <form:select path="menuId"
					class="input-medium">
					<form:option value="" label="" />
					<form:options items="${fns:getDictList('center_type')}"
						itemLabel="label" itemValue="value" htmlEscape="false" />
				</form:select></li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary"
				type="submit" value="查询" /></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}" />
	<table id="contentTable"
		class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>菜单归属</th>
				<th>功能归属</th>
				<th>功能名称</th>
				<th>功能类型</th>
				<th>价格</th>
				<th>状态</th>

				<shiro:hasPermission name="cloudfactory:cloudfactoryFunction:edit">
					<th>操作</th>
				</shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="cloudfactoryFunction">
				<tr>

					<td>${fns:getDictLabel(cloudfactoryFunction.functionType, 'function_type', '')}
					</td>
					<td>${fns:getDictLabel(cloudfactoryFunction.menuId, 'center_type', '')}
					</td>
					<td>${cloudfactoryFunction.functionName }</td>
					<td><c:choose>
							<c:when test="${cloudfactoryFunction.isRequired =='0'}">
基础功能 
</c:when>
							<c:when test="${cloudfactoryFunction.isRequired =='1'}">
选配功能
</c:when>
							<c:otherwise>
							</c:otherwise>
						</c:choose></td>
					<td>${cloudfactoryFunction.money}</td>
					<td><c:choose>
							<c:when test="${cloudfactoryFunction.delFlag =='0'}">
启用
</c:when>

							<c:otherwise>
							停用
							</c:otherwise>
						</c:choose></td>




					<shiro:hasPermission name="cloudfactory:cloudfactoryFunction:edit">
						<td><a
							href="${ctx}/cloudfactory/cloudfactoryFunction/form?id=${cloudfactoryFunction.id}">修改</a>
							<a
							href="${ctx}/cloudfactory/cloudfactoryFunction/delete?id=${cloudfactoryFunction.id}"
							onclick="return confirmx('确认停用该功能？', this.href)">停用</a></td>
					</shiro:hasPermission>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>